package com.rms.utils;

import javax.annotation.Resource;
import javax.sql.DataSource;

import org.apache.commons.dbutils.QueryRunner;

import org.springframework.stereotype.Component;


@Component
public class JdbcUtils {

	// 初始化连接池
	@Resource
	private  DataSource dataSource;

	public  DataSource getDataSource() {
		return dataSource;
	}
	
	/**
	 * 创建DbUtils常用工具类对象
	 */

	public  QueryRunner getQuerrRunner()
	{

		return new QueryRunner(dataSource);
	}
}








